import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'amfe-flexible'
// 全局自定义指令
import directives from './utils/directives'
import 'highlight.js/styles/default.css'

import './VantUse'// VantUse里代码执行(注册vant组件)

Vue.use(directives)// 全局自定义指令
Vue.config.productionTip = false

// process.env是node内置的
// 提取环境变量里NODE_ENV的值
// 开发环境启动(yarn sever)值就是'development'
if (process.env.NODE_ENV !== 'development') {
  console.log = function () {}
  console.error = function () {}
  console.dir = function () {}
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
